import axios from "../../../utils/axios";

// 获取图书馆列表
export const getLibraryList = ({ pageNum, pageSize }: any) => {
    return axios({
        method: 'get',
        url: `/prod-api/api/digital-library/library/list?pageNum=${pageNum}&pageSize=${pageSize}`,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    })
}

// 获取图书馆详情
export const getLibraryDetail = (id: any) => {
    return axios({
        method: 'get',
        url: `/prod-api/api/digital-library/library/${id}`,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    })
}

// 获取图书馆评论列表
export const getLibraryCommentList = ({ pageNum, pageSize, libraryId }: any) => {
    return axios({
        method: 'get',
        // url: `/prod-api/api/digital-library/library-comment/list?libraryId=${libraryId}&pageNum=${pageNum}&pageSize=${pageSize}`,
        url: `/prod-api/api/digital-library/library-comment/list?libraryId=10&pageNum=1&pageSize=10`,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    })
}